package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * PROJECT_NAME: sky-take-out
 * NAME: OrderDetailMapper
 * USER: zhang
 * DATE: 2023/5/29
 * DESCRIPTION :C端-订单明细持久层接口
 */
@Mapper
public interface OrderDetailMapper {

    /**
     * 订单详情数据的添加
     * @param orderDetailList 订单明细信息集合
     */
    void batchInsertOrderDetail(@Param("orderDetailList") List<OrderDetail> orderDetailList);

    /**
     * 通过订单Id查询订单详情
     * @param id 订单Id
     * @return 订单详情信息
     */
    List<OrderDetail> selectOrderDetailByOrderId(@Param("id") Long id);



}
